//
//  Constant.h
//  ZYTS-iPhone
//
//  Created by yuzhou on 12-12-6.
//  Copyright (c) 2012年 wzyk. All rights reserved.
//

#define TabButtonHeigth 45
#define TabButtonWidth 64

#define PlayerBarHeight 42

#define FolderPath(item_id) [NSHomeDirectory() stringByAppendingPathComponent:[NSString stringWithFormat:@"Library/Caches/mp3/%@",item_id]]
#define DownloadPath(item_id,subitem_id) [NSHomeDirectory() stringByAppendingPathComponent:[NSString stringWithFormat:@"Library/Caches/mp3/%@/%@.mp3",item_id,subitem_id]]
#define TempPath(item_id,subitem_id) [NSHomeDirectory() stringByAppendingPathComponent:[NSString stringWithFormat:@"Library/Caches/mp3/%@/%@.tmp",item_id,subitem_id]]

#define iPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)

#define kAllDownload @"kAllDownload"

#define kUpdateProgressInShelfCell @"kUpdateProgressInShelfCell"
#define kOneDownloadFinished @"kOneDownloadFinished"
#define kUpdateDownloadStatus @"kUpdateDownloadStatus"

#define kShowChannel @"kShowChannel"

#define kPlayerStateDidChange @"kPlayerStateDidChange"

#define kAudioProgressDidChange @"kAudioProgressDidChange"

#define kPlayerIndexDidChange @"kPlayerIndexDidChange"

#define kAudioPlayerHistoryIndex @"kAudioPlayerHistoryIndex"

#define kAudioPlayerMode @"kAudioPlayerMode"

#define kCoverImage @"kCoverImage"

#define kUpdateComment @"kUpdateComment"

#define kDownloadViaWWAN @"kDownloadViaWWAN"

#define kCurrentCategory @"kCurrentCategory"

#define kConnectionEnable @"kConnectionEnable"

#define kNextUpdateDate @"kNextUpdateDate"

#define kReadAuthorityFail @"kReadAuthorityFail"

enum kTabButton
{
    kTabButtonHome = 101,
    kTabButtonChannel,
    kTabButtonShelf,
    kTabButtonAccount,
    kTabButtonSetting
};

enum kShelfButton
{
    kShelfButtonDownloaded = 201,
    kShelfButtonDownloading,
    kShelfButtonPlayrecord
};

//中邮听书AppStore地址
#define AppURL @"https://itunes.apple.com/us/app/zhong-you-ting-shu/id624436405"

//首页推荐
#define FeaturedURL @"http://service.183read.com/service/audio.php?act=get.recommend.audio.new&param={\"platform\":\"Mobile听书版\",\"app_id\":\"3\",\"app_name\":\"mobile听书版\",\"category\":\"audio\",\"store_id\":\"0\",\"user_id\":\"%@\",\"random_code\":\"123456789\",\"column_id\":\"192\"}"
#define gotFeaturedNotify @"gotFeaturedNotify"

//首页广告
#define AdURL @"http://service.183read.com/service/audio.php?act=get.audio.ad&param={\"platform\":\"Mobile听书版\",\"app_id\":\"3\",\"app_name\":\"mobile听书版\",\"category\":\"audio\",\"store_id\":\"0\",\"user_id\":\"%@\",\"random_code\":\"123456789\"}"
#define gotAdNotify @"gotAdNotify"

//评书信息
#define BookInfoURL @"http://service.183read.com/service/audio.php?act=get.detail.audio&param={\"platform\":\"Mobile听书版\",\"app_id\":\"3\",\"app_name\":\"mobile听书版\",\"category\":\"audio\",\"store_id\":\"0\",\"user_id\":\"%@\",\"random_code\":\"123456789\",\"item_id\":\"%@\"}"
#define gotBookInfoNotify @"gotBookInfoNotify"

//评书目录
#define BookContentURL @"http://service.183read.com/service/audio.php?act=get.all.sub.audio&param={\"platform\":\"Mobile听书版\",\"app_id\":\"3\",\"app_name\":\"mobile听书版\",\"category\":\"audio\",\"store_id\":\"0\",\"user_id\":\"%@\",\"random_code\":\"123456789\",\"item_id\":\"%@\"}"
#define gotBookContentNotify @"gotBookContentNotify"

//评书评论
#define BookCommentURL @"http://service.183read.com/service/audio.php?act=get.comment.audio&param={\"platform\":\"Mobile听书版\",\"app_id\":\"3\",\"app_name\":\"mobile听书版\",\"category\":\"audio\",\"store_id\":\"0\",\"user_id\":\"%@\",\"random_code\":\"123456789\",\"item_id\":\"%@\"}"
#define gotBookCommentNotify @"gotBookCommentNotify"

//频道分类
#define CategoryURL @"http://service.183read.com/service/audio.php?act=get.class.audio&param={\"platform\":\"Mobile听书版\",\"app_id\":\"3\",\"app_name\":\"mobile听书版\",\"category\":\"audio\",\"store_id\":\"0\",\"user_id\":\"%@\",\"random_code\":\"123456789\"}"
#define gotCategoryNotify @"gotCategoryNotify"

//频道内容
#define ChannelURL @"http://service.183read.com/service/audio.php?act=get.audio.class&param={\"platform\":\"Mobile听书版\",\"app_id\":\"3\",\"app_name\":\"mobile听书版\",\"category\":\"audio\",\"store_id\":\"0\",\"user_id\":\"%@\",\"random_code\":\"123456789\",\"class_id\":\"%@\"}"
#define gotChannelNotify @"gotChannelNotify"

//用户登录
#define LoginURL @"http://register.183read.com:8080/service/service?act=login.user&param={\"platform\":\"iphone\",\"app_name\":\"mall\",\"category\":\"magazine\",\"store_id\":\"0\",\"user_name\":\"%@\",\"password\":\"%@\"}"
#define loginNotify @"loginNotify"
#define kLoginSuccess @"kLoginSuccess"
#define kLoginFail @"kLoginFail"
#define kLogout @"kLogout"

//用户注册
#define RegisterURL @"http://register.183read.com:8080/service/service?act=register.user&param={\"platform\":\"iphone\",\"app_name\":\"mall\",\"category\":\"magazine\",\"store_id\":\"0\",\"user_name\":\"%@\",\"password\":\"%@\",\"email\":\"%@\"}"
#define registerNotify @"registerNotify"
#define kRegisterSuccess @"kRegisterSuccess"
#define kRegisterFail @"kRegisterFail"

//用户更改密码
#define ModifyURL @"http://register.183read.com:8080/service/service?act=editpwd.user&param={\"user_name\":\"%@\",\"password\":\"%@\",\"new_pad\":\"%@\"}"
#define modifyNotify @"modefyNotify"

//收藏书籍
#define CollectBookURL @"http://service.183read.com/service/audio.php?act=add.favorite.audio&param={\"platform\":\"Mobile听书版\",\"app_id\":\"3\",\"app_name\":\"mobile听书版\",\"category\":\"audio\",\"store_id\":\"0\",\"user_id\":\"%@\",\"user_name\":\"%@\",\"random_code\":\"123456789\",\"item_id\":\"%@\"}"
#define collectBookNotify @"modefyNotify"

//收藏评论分享次数
#define UserActionsURL @"http://service.183read.com/service/audio.php?act=get.user.audio.info&param={\"platform\":\"Mobile听书版\",\"app_id\":\"3\",\"app_name\":\"mobile听书版\",\"category\":\"audio\",\"store_id\":\"0\",\"user_id\":\"%@\",\"user_name\":\"%@\",\"random_code\":\"123456789\"}"
#define gotUserActionsNotify @"gotUserActionsNotify"

//已收藏列表
#define CollectedURL @"http://service.183read.com/service/audio.php?act=get.audio.favorite&param={\"platform\":\"Mobile听书版\",\"app_id\":\"3\",\"app_name\":\"mobile听书版\",\"category\":\"audio\",\"store_id\":\"0\",\"user_id\":\"%@\",\"random_code\":\"123456789\"}"
#define gotCollectedNotify @"gotCollectedNotify"

//已评论列表
#define CommentedURL @"http://service.183read.com/service/audio.php?act=get.audio.comment&param={\"platform\":\"Mobile听书版\",\"app_id\":\"3\",\"app_name\":\"mobile听书版\",\"category\":\"audio\",\"store_id\":\"0\",\"user_id\":\"%@\",\"random_code\":\"123456789\"}"
#define gotCommentedNotify @"gotCommnetedNotify"

//已分享列表
#define SharedURL @"http://service.183read.com/service/audio.php?act=get.audio.share&param={\"platform\":\"Mobile听书版\",\"app_id\":\"3\",\"app_name\":\"mobile听书版\",\"category\":\"audio\",\"store_id\":\"0\",\"user_id\":\"%@\",\"random_code\":\"123456789\"}"
#define gotSharedNotify @"gotSharedNotify"

//关键字搜索
#define SearchURL @"http://service.183read.com/service/audio.php?act=get.search.audio&param={\"platform\":\"Mobile听书版\",\"app_id\":\"3\",\"app_name\":\"mobile听书版\",\"category\":\"audio\",\"store_id\":\"0\",\"user_id\":\"%@\",\"random_code\":\"123456789\",\"keywords\":\"%@\"}"
#define gotSearchNotify @"gotSearchNotify"

//推荐关键字
#define KeywordsURL @"http://service.183read.com/service/audio.php?act=get.comment.search.audio&param={\"platform\":\"Mobile听书版\",\"app_id\":\"3\",\"app_name\":\"mobile听书版\",\"category\":\"audio\",\"store_id\":\"0\",\"user_id\":\"%@\",\"random_code\":\"123456789\"}"
#define gotKeywordsNotify @"gotKeywordsNotify"

//艺术家列表
#define ArtistsURL @"http://service.183read.com/service/audio.php?act=get.broadcaster.audio&param={\"platform\":\"Mobile听书版\",\"app_id\":\"3\",\"app_name\":\"mobile听书版\",\"category\":\"audio\",\"store_id\":\"0\",\"user_id\":\"%@\",\"random_code\":\"123456789\"}"
#define gotArtistsNotify @"gotArtistsNotify"

//艺术家作品列表
#define ArtistWorkURL @"http://service.183read.com/service/audio.php?act=get.audio.broadcaster&param={\"platform\":\"Mobile听书版\",\"app_id\":\"3\",\"app_name\":\"mobile听书版\",\"category\":\"audio\",\"store_id\":\"0\",\"user_id\":\"%@\",\"random_code\":\"123456789\",\"broadcaster_id\":\"%@\"}"
#define gotArtistWorkNotify @"gotArtistWorkNotify"

//发表评论
#define CommentBookURL @"http://service.183read.com/service/audio.php?act=add.comment.audio&param={\"platform\":\"Mobile听书版\",\"app_id\":\"3\",\"app_name\":\"mobile听书版\",\"category\":\"audio\",\"store_id\":\"0\",\"user_id\":\"%@\",\"user_name\":\"%@\",\"random_code\":\"123456789\",\"item_id\":\"%@\",\"content\":\"%@\",\"comment_rank\":\"%d\"}"
#define gotCommentBookNotify @"gotCommentBookNotify"

//获取更新信息
#define AppUpdateURL @"http://211.103.154.149/service/service_new.php?act=get.mobile.app.version&param={\"platform\":\"Mobile听书版\",\"app_id\":\"3\",\"app_name\":\"mobile听书版\",\"category\":\"audio\",\"mobileapp_id\":\"2\",\"version\":\"%@\"}"
#define gotAppUpdateInfoNotify @"gotAppUpdateInfoNotify"



